Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 5 - Ink Objects / Ink Objects Reference
Functions / Getting and Setting an Ink's Color


GXGetShapeColor

You can use the GXGetShapeColor function to examine the color of an ink object associated with a shape.

gxColor *GXGetShapeColor(gxShape source, gxColor *data);
source
A reference to the shape whose ink you want the color of.
data
A pointer to a color structure. On return, the structure contains the color of the ink object associated with the shape.
function result
The color of the ink object associated with the source shape object.
DESCRIPTION
The GXGetShapeColor function returns, as its function result and in the structure pointed to by the data parameter, the color of the ink object associated with the shape object referenced in the source parameter.

This call is equivalent to

myColor = GXGetInkColor(GXGetShapeInk(myShape),myColor);
If the shape object reference or the pointer to the color structure is nil, an error is posted, and nil is returned as the function result.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
shape_is_nil 
color_is_nil 
SEE ALSO
To assign a color to the ink object associated with a shape, use the GXSetShapeColor function, described next.

To examine the color of an ink object directly, use the GXGetInkColor function, described on page 5-68.

Ink colors are introduced in the section "Color" beginning on page 5-7, and described fully in the chapter "Colors and Color-Related Objects" in this book.

The GXGetShapeInk function is described in the chapter "Shape Objects" in this book.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996